package com.example.design.bilibili.adapter.objAdapter;

public class VoltageAdapter implements IVoltage5V {

    private Voltage220V voltage220V;

    public VoltageAdapter(Voltage220V voltage220V) {
        this.voltage220V = voltage220V;
    }

    @Override
    public int output5V() {
        //获取220V电压
        int src = voltage220V.output220V();
        int dstV = src/44;//转换成5V
        return dstV;
    }
}
